package com.springboot.bean;

import java.util.StringJoiner;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class BlogProperties {
	
	@Value("${mrbird.blog.name}")
	private String name;
	
	@Value("${mrbird.blog.title}")
	private String title;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Override
	public String toString() {
		StringJoiner sJoiner = new StringJoiner("", "BlogProperties{", "}");
		sJoiner.add("name=\"").add(name).add("\"");
		sJoiner.add(", title=\"").add(title).add("\"");
		return sJoiner.toString();
	}
}
